// 打印质数

public class PrimeNumber {
    public static void main(String[] args) {
        System.out.println(1);
        System.out.println(2);
        boolean flag = true;
        //经典的双重for循环
        for (int i = 3; i <= 100; i++) {
            for (int j = 2;j<=Math.sqrt(i);j++){
                if (i%j==0){  //可以判断出不是质数的值
                    flag = true;
                    break;
                }else {
                    flag =false;
                }

            }
            if (flag==false){
                System.out.println(i);
            }
        }
    }
}

